<?
    session_start();
    include('../home/config.php');
    $username = $_POST['user_name'];
    $password = md5($_POST['password']);
    $db_sel = new db_query($sql = "SELECT * FROM admin WHERE user_name='" . $username . "' AND password='" . $password . "'");
    $row    = mysql_fetch_assoc($db_sel->result);
    if(isset($row['user_name'])){
        echo 1;
        $_SESSION['username'] = $username;
    }
    else{
        echo 0;
    }
?>
